﻿using System;

public class Player
{
	private int coins, arrows, score, location;
	//Constructors default and custom
	public Player()
	{
		this.coins = 0;
		this.arrows = 3;
		this.location = 0;
	}
	public Player(int coins, int arrows, int location)
	{
		this.coins = coins;
		this.arrows = arrows;
		this.location = location;
	}
	//Logic methods
	/// <summary>
	/// Used to find the current score of the player using the number of arrows and coins
	/// </summary>
	private void calculateScore()
	{
		score = (this.arrows * 10) + this.coins;
	}
	/// <summary>
	/// Prints out the player stats to the console coins, arrows, and score
	/// </summary>
	public void printPlayerStats()
	{
		calculateScore();
		String print = "This Player has " + this.coins + " coins and " + this.arrows + " arrows for a total score of " + this.score + " and is at loaction " + this.location;
		Console.WriteLine(print);
	}
    public int fireArrow()
    {
        this.arrows--;
        return this.location;
    }

	//Get set methods
	public int Coins
	{
		get { return this.coins; }
		set { this.coins = value; }
	}
	public int Arrows
	{
		get { return this.arrows; }
		set { this.arrows = value; }
	}
	public int Score
	{
		get { return this.score; }
		set { this.score = value; }
	}
	public int Location
	{
		get { return this.location; }
		set { this.location = value; }
	}

}
